<?php
   class commentController extends platformController{
	   //有关新闻留言的控制器
	   //载入新闻留言
	   public function getchAllAction(){
		   $model=new commentModel();
		   $rs=$model->getchAll();
		   $sr=$model->getAll();
		   $ss=$model->gethuihu();
		   require CURRENT_VIEW_PATH."news_comment.html";
	   }
	   //删除一层新闻留言
	   public function deleteAction(){
		   $model=new commentModel;
		   if(!isset($_GET['id'])){
			   return;
		   }
		   if($rs=$model->delete()){
			   echo "删除成功";
		   }else{
			   echo "<script>alert('删除失败');history.back();</script>";
		   }
	   }
	   //删除二层新闻回复
	   public function deleAction(){
		   $model=new commentModel;
		   if(!isset($_GET['id'])){
			   return;
		   }
		   if($rs=$model->dele()){
			    echo "删除成功";
		   }else{
			   echo "<script>alert('删除失败');history.back();</script>";
		   }
	   }
   }
?>


